package com.xc.disk.web.rest;

import com.xc.disk.info.TokenInfo;
import com.xc.disk.bean.MailHtmlBean;
import com.xc.disk.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>项目名称: Stars</p>
 * <p>描述: 邮件rest</p>
 * <P>创建人:小程 </p>
 * <P>创建人邮箱: 779943476@qq.com</p>
 * <p>创建时间: 2019/10/30</p>
 *
 * @version v1.0
 */
@RestController
public class MailRest {
    @Autowired
    private MailService mailService;

    /**
     * 发送邮件,发送html
     *
     * @param mailHtmlBean 参数
     */
    @PostMapping(value = "/mail/send/html")
    public void sendHtmlMail(TokenInfo token, @RequestBody MailHtmlBean mailHtmlBean) {
        mailService.sendHtmlMail(mailHtmlBean);
    }

}
